char=?, char<?, char>?, char<=?, char>=? - character comparison

LIBRARY

(import (rnrs))                     ;R6RS
(import (rnrs base))                ;R6RS
(import (scheme r5rs))              ;R7RS
(import (scheme base))              ;R7RS

SYNOPSIS

(char=? char char char ...)
(char<? char char char ...)
(char>? char char char ...)
(char<=? char char char ...)
(char>=? char char char ...)

DESCRIPTION

These procedures return #t if the results of passing their arguments to char->integer are (respectively): equal, monotonically increasing, monotonically decreasing, monotonically nondecreasing, or monotonically nonincreasing, and #f otherwise.

In R6RS systems, these procedures impose a total ordering on the set of characters according to their Unicode scalar values.

RETURN VALUES

Returns a single boolean value.

EXAMPLES

(char<? #\z #\ß)  =>  #t
(char<? #\z #\Z)  =>  #f

COMPATIBILITY

Both R6RS and R7RS define the order based on the Unicode scalar values of characters, but R7RS not require full Unicode support and also permits non-Unicode characters.

These procedures exist in R5RS and earlier reports, but they were only required to support two arguments.

IEEE Scheme uses the ≤ and ≥ characters instead of <= and >= in the procedure entries, but this is probably a typo.

ERRORS

This procedure can raise exceptions with the following condition types:
&assertion (R6RS)
The wrong number of arguments was passed or an argument was outside its domain.
R7RS
The assertions described above are errors. Implementations may signal an error, extend the procedure's domain of definition to include such arguments, or fail catastrophically.

SEE ALSO

char-ci=?(3scm)

STANDARDS

R4RS, IEEE Scheme, R5RS, R6RS, R7RS

AUTHORS

This page is part of the scheme-manpages project. It includes materials from the RnRS documents. More information can be found at https://github.com/schemedoc/manpages/.


Markup created by unroff 1.0sc,    March 04, 2023.